﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="SampleSubscribeUnsubscribe.aspx.cs" Inherits="OpenWaves.ActivityFeed.Web.Tests.Samples.SampleSubscribeUnsubscribe" %>

<%@ Register Src="~/Samples/SampleDescription.ascx" TagName="SampleDescription" TagPrefix="c" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <style type="text/css" media="all">
    
        .section h4
        {
            padding: 0;
            margin: 0;
        }
        
        div.section 
        {
            padding-bottom: 50px;
        }
    
    </style>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="cphBody" runat="server">

<c:SampleDescription runat="server">
    <MessageTemplate>
        <p>This example shows how to subscribe/unsubscribe for topics from C# code (without using SubscribbeUnsubscribe button control).</p>
    </MessageTemplate>
</c:SampleDescription>

<div class="section">
<h4>Subscribe</h4>
<asp:LinkButton runat="server" Text="Topic1" CommandArgument="Topic1" OnClick="Subscribe"></asp:LinkButton>
<asp:LinkButton runat="server" Text="Topic2" CommandArgument="Topic2" OnClick="Subscribe"></asp:LinkButton>
<asp:LinkButton runat="server" Text="Topic3" CommandArgument="Topic3" OnClick="Subscribe"></asp:LinkButton>
<asp:LinkButton runat="server" Text="All" CommandArgument="Topic1,Topic2,Topic3" OnClick="Subscribe"></asp:LinkButton>
</div>

<div class="section">
<h4>Unsubscribe</h4>
<asp:LinkButton runat="server" Text="Topic1" CommandArgument="Topic1" OnClick="Unsubscribe"></asp:LinkButton>
<asp:LinkButton runat="server" Text="Topic2" CommandArgument="Topic2" OnClick="Unsubscribe"></asp:LinkButton>
<asp:LinkButton runat="server" Text="Topic3" CommandArgument="Topic3" OnClick="Unsubscribe"></asp:LinkButton>
<asp:LinkButton runat="server" Text="All" CommandArgument="Topic1,Topic2,Topic3" OnClick="Unsubscribe"></asp:LinkButton>
</div>


<div class="section">
<h4>List of subscriptions</h4>

    <asp:Repeater ID="rptSubscriptions" runat="server">
        <ItemTemplate>
            <span><%# Container.DataItem %></span>
        </ItemTemplate>
    </asp:Repeater>

</div>

</asp:Content>
